1. Field of the Invention
The present invention relates to a system for data management managing data of a relatively long length such as video data and audio data recorded on variable length recording areas of a randomly accessible recording medium such as a magnetooptic (MO) disc or hard disc (HD), more particularly relates to randomly accessible recording media, a method of data management, a method of generating and recording management data, and data management apparatuses used in such a system.
2. Description of the Related Art
When recording or reproducing data to or from a randomly accessible recording medium such as a magnetooptic disc or hard disc, it becomes necessary to manage data managing what data are recorded at what recording areas of the recording medium.
In the management of data in MS-DOS (trademark of Microsoft Corporation), the operating system of personal computers, as shown in FIG. 1A to FIG. 1C, use is made of the FAT system using a table called a xe2x80x9cfile allocation tablexe2x80x9d (FAT). In the management of data in the operating system of general purpose computers known as UNIX (trademark of ATT), as shown in FIG. 2A to FIG. 2C, use is made of the i-node system using a table called an xe2x80x9ci-nodexe2x80x9d.
FIG. 1A shows the content of a file entry, FIG. 1B shows the content of the FAT, and FIG. 1C shows the recording areas on a recording medium.
In MS-DOS, recording areas (file data areas) are allocated in units of clusters on the recording medium for each of the files containing data to be managed (recordal data). A file entry is prepared for each file as shown in FIG. 1A, and a column of the FAT (FAT entry) shown in FIG. 1B is prepared for each cluster.
As shown in FIG. 1A, a file entry has recorded in it the data showing the name of the file (file name) stored in the corresponding clusters and the no. of the cluster at which the head portion of the file is recorded (head FAT no.)
As shown in FIG. 1B, each FAT entry has recorded in it data showing the state of use of the cluster, that is, the state of non-use, two types of states of use, and a defective state. Among the two types of states of use, when the cluster is in use and a continuation of the recordal data is recorded in another cluster, data showing the next cluster no. is recorded, while when the cluster is in use and there is no continuation of the recordal data recorded in another cluster, an xe2x80x9cend-of-filexe2x80x9d (EOF) showing that the cluster is the last cluster is recorded.
Accordingly, in the clusters of the recording medium, as shown by the hatching in FIG. 1C, when the file xe2x80x9cfile 1xe2x80x9d (xe2x80x9cfile 1xe2x80x9d being a file name) is recorded at the clusters 3, 4, and 8, xe2x80x9cfile 1xe2x80x9d is recorded as the data showing the file name of the file entry and xe2x80x9c3xe2x80x9d is recorded as the head FAT no.
Further, the FAT entry (FAT3) corresponding to the cluster 3 has recorded in it the no. xe2x80x9c4xe2x80x9d of the next cluster on which a continuation of the recordal data is recorded so as to show that a continuation of the recordal data is recorded at another cluster. Similarly, the FAT4 has the next cluster no. xe2x80x9c8xe2x80x9d recorded in it. The FAT8 has recorded in it the xe2x80x9cend-of-file (EOF) for showing that the cluster is in use, but that no continuation of the recordal data is recorded at another cluster.
MS-DOS, when for example reading a file xe2x80x9cfile 1xe2x80x9d, first runs a search referring to the data showing the file names of the file entries so as to find the file entry corresponding to the file xe2x80x9cfile 1xe2x80x9d. Next, it refers to the head FAT no. of the file entry it found and then refers to the FAT 4 from the content of the FAT3. Finally, it recognizes the xe2x80x9cend-of-filexe2x80x9d of the FAT8 from the content of the FAT4 and stops referring to the FAT entries. In this way, MS-DOS successively traces back from the FAT entry shown by the head FAT no. to the FAT entry in which the xe2x80x9cend-of-filexe2x80x9d is recorded to thereby be able to read from the recording medium the file xe2x80x9cfile 1xe2x80x9d recorded at the clusters 3, 4, and 8.
FIGS. 2A to 2C are views illustrating the management of data by the i-node system, wherein FIG. 2A shows the content of a file entry, FIG. 2B shows the content of an i-node, and FIG. 2C shows recording areas on a recording medium.
In the i-node system, a file entry shown in FIG. 2A corresponding to each file and an i-node shown in FIG. 2B are prepared.
In the i-node system, a file entry has recorded in it data showing the file name and an i-node no. showing the i-node of that file. An i-node has recorded in it the file size showing the length of data of the file and block pointers (direct assignment pointers) directly showing for example 1,024 byte unit recording areas (blocks) at which the file is recorded. Note that the i-node sometimes has recorded data showing attributes of the file. Further, it sometimes has recorded an indirect assignment pointer showing a block in which is recorded a plurality of direct assignment pointers instead of the direct assignment pointers.
For example, as shown in FIGS. 2B and 2C, when the content of the i-node is that the file xe2x80x9cfile 2xe2x80x9d has data of a length of 3000 bytes and is recorded at blocks 3, 4, and 8, UNIX refers to the i-node and can recognize that the data of the file xe2x80x9cfile 2xe2x80x9d is recorded at all of the blocks 3 and 4 and at the portion of the block 8 from the head to the 952nd byte.
The above-explained file entry and FAT or i-node are all recorded at predetermined areas on the recording medium.
If data is managed by the above-explained FAT system and i-node system, one FAT entry or one direct pointer of the i-node becomes necessary for each unit of the recording area (the above-mentioned cluster or block). Therefore, when managing data for a file containing recordal data of extremely long individual lengths such as audio data or video data, there is the problem that the recording areas for recording the FATs or i-nodes in the recording medium become extremely large.
This problem will be explained in more detail using as an example the case of a length of data of a cluster or block of 1 kbyte and a length of data of the recordal data of 100 Mbytes.
When managing data of a file containing such recordal data by the FAT system, the number of FAT entries required becomes 100,000. Therefore, to identify each of the 100,000 FAT entries, 4 bytes of data become necessary. Therefore, it is learned that 400 kbytes of memory are necessary for storing the FAT entries.
When managing data of a file containing such recordal data by the i-node system, the number of direct assignment pointers necessary becomes 100,000. Therefore, to identify each of the 100,000 direct assignment pointers, 4 bytes of data become necessary to show a single FAT entry. Therefore, it is learned that 400 kbytes of memory are necessary for recording all of the direct pointers in the same way as the FAT system.
In the FAT system or i-node system, to reduce the number of the FAT entries or the number of the i-node direct pointers, it may be considered to increase the length of the data of the cluster or the block for example. However, in these systems, the data of the files is managed in units of clusters or blocks, so when the length of the recordal data is not a whole multiple of the length of data of the clusters or the blocks, there is the problem of a large amount of waste occurring in the cluster or block recording the file which contains the final portion of the recordal data.
The present invention was made in consideration of the above problems in the prior art and has as its object to provide a method of data management and apparatus for the same enabling data to be managed using a table of a much shorter length of data compared with the FAT system and i-node system for a file containing data of an extremely long length, for example, audio data and video data.
Further, the present invention has as its object the provision of a method of data management and an apparatus for the same enabling a reduction of the recording area which the table for data management occupies in the recording medium and enables effective utilization of the recording medium.
Further, the present invention has as its object the provision of a method of data management and an apparatus for the same enabling a reduction of the wasted recording area caused on a recording medium regardless of if the data of the table used for the data management is short in length.
According to a first aspect of the present invention, there is provided a randomly accessible recording medium, including a data area in which recordal data is recorded in one or more variable length recording blocks by file and a management data area in which file entries and recording entries for each recording block of the files are recorded, the file entries including name data showing the names of the recordal data recorded in the files and identification data showing the record entries of the first recording blocks in which the recordal data are recorded, the record entries including head position data showing the heads of the recording blocks, link data showing the recording blocks in which continuations of the recordal data are recorded, and recording length data showing the recording lengths of the recording blocks.
According to a second aspect of the invention, there is provided a method of data management for managing data on a randomly accessible recording medium, comprised of a data area in which recordal data is recorded in one or more variable length recording blocks by file and a management data area in which file entries and recording entries for each recording block of the files are recorded, the file entries including name data showing the names of the recordal data recorded in the files and identification data showing the record entries of the first recording blocks in which the recordal data are recorded, the record entries including head position data showing the heads of the recording blocks, link data showing the recording blocks in which continuations of the recordal data are recorded, and recording length data showing the recording lengths of the recording blocks wherein use is made of the name data showing the name of the recordal data to be accessed to find the file entry and use is made of the head position data and the recording length data of the record entry shown by the identification data of the file entry of the recordal data to be accessed and the record entry shown by the link data of that record entry to access the recordal data.
According to a third aspect of the present invention, there is provided a method of generating and recording recordal data on a randomly accessible recording medium and management data for managing that recordal data, comprised of the steps of:
a) generating a file entry including name data showing the name of the recordal data,
b) acquiring record entry nos.,
c) writing the first record entry no. in the file entry as the head record entry no.,
d) securing an empty recording area in the data recording area on the recording medium,
e) writing the head position of the empty recording area in the record entry as head position data,
f) recording the recordal data in the empty recording area,
g) writing the size of the recorded recordal data in the record entry as the recording length data when the empty recording area becomes full and there is still recordal data remaining,
h) acquiring the next record entry no. and writing the next record entry no. in the previous record entry as link data when there is still recordal data remaining,
i) repeating steps d) to h) until there is no longer any recordal data to be recorded, and
j) writing the size of the recordal data recorded in the recording area in the recording entry as the recording length data and writing link down showing that it is the end in the final record entry when there is no longer any recordal data to be recorded.
According to a fourth aspect of the invention, there is provided a data management apparatus for managing recordal data recorded at recording areas of variable length on a randomly accessible recording medium, the data management apparatus provided with a record entry generating means for generating a record entry establishing correspondence among link data, head position data, and recording length data for each the recording area, a link data generating means for generating link data showing the record entry of the recording area on which a continuation of the recordal data recorded at the recording area is recorded, a head position data generating means for generating head position data showing the head position of the recording area, a recording length data generating means for generating recording length data showing the length of the recordal data recorded at the recording area, a file entry generating means for generating a file entry establishing correspondence between name data showing the name of the recordal data and identification data showing the record entry of the recording area on which the head portion of the recordal data is recorded, and an access management means for managing access to the recordal data using the name data showing the name of the recordal data to be accessed to search through the file entries and using the head position data and recording length data of the record entry shown by the identification data of the file entry of the recordal data to be accessed and the record entry shown by the link data of the record entry.